package cqie.personal.frame.bo;


public class GetUserBO {
    private Integer userId;
    private String userAccount;
    private String userName;
    private Integer uid;
    private String userPhone;
    private Integer userSex;
    private Boolean userAbandon;
    private Integer characterId;
    private String characterName;
    private Integer userType;
    private Integer pageOff;
    private Integer pageMax;
    private Integer pageNo;
    private Integer classId;
    private Integer departmentId;

    public GetUserBO() {
        this.pageNo = 1;
        this.pageMax = 5;
        setPageOff();
    }

    public String getUserName() {
        return userName;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Integer getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(Integer departmentId) {
        this.departmentId = departmentId;
    }

    public void setUserName(String userName) {
        if(!userName.equals("")) {
            if(!userName.replace(" ", "").equals("")) {
                this.userName = userName;
            }
        }
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getCharacterId() {
        return characterId;
    }

    public void setCharacterId(Integer characterId) {
        this.characterId = characterId;
    }

    public String getCharacterName() {
        return characterName;
    }

    public void setCharacterName(String characterName) {
        if(!characterName.equals("")) {
            if(!characterName.replace(" ", "").equals("")) {
                this.characterName = characterName;
            }
        }
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
            this.userId =userId;
    }

    public String getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(String userAccount) {
        if(!userAccount.equals("")) {
            if(!userAccount.replace(" ", "").equals("")) {
                this.userAccount = userAccount;
            }
        }
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
            this.uid =uid;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        if(!userPhone.equals("")){
            if(!userPhone.replace(" ", "").equals("")){
                this.userPhone = userPhone;
            }
        }

    }

    public Integer getUserSex() {
        return userSex;
    }

    public void setUserSex(Integer userSex) {
            this.userSex = userSex;
    }

    public Boolean getUserAbandon() {
        return userAbandon;
    }

    public void setUserAbandon(Boolean userAbandon) {
        this.userAbandon = userAbandon;
    }


    public Integer getPageOff() {
        return pageOff;
    }

    private void setPageOff() {
        this.pageOff = pageMax * (pageNo-1);
    }

    public Integer getPageMax() {
        return pageMax;
    }

    public void setPageMax(Integer pageMax) {
        if(pageMax>0){
            this.pageMax = pageMax;
            setPageOff();
        }

    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setPageNo(Integer pageNo) {
        if(pageNo>0) {
            this.pageNo = pageNo;
            setPageOff();
        }
    }
}
